package com.ehi.queue.config;

import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import javax.jms.Queue;

@Configuration
@ComponentScan("com.ehi.common,com.ehi.queue")
public class AppConfig {
    @Value("${amq.queue.name}")
    private String queueName;

    @Bean
    public Queue queue() {
        System.out.println("queueName:" + this.queueName);
        return new ActiveMQQueue("sample.queue");
    }
}
